package designpattern.observer.p3;

import designpattern.observer.p3.CalcEvent.Step;

public class Main {
    public static void main(String[] args) throws InterruptedException {
        Calculator calculator = new Calculator();
        // calculator.getSubject().subscribe(System.out::println);
        calculator.getSubject().filter(x -> x instanceof Step)
                .subscribe(System.out::println);
        calculator.calc();
    }
}
